<?php

namespace app\common\validate;
use think\Validate;

class BusinessValidate extends Validate
{
    protected $rule = [
        'name'  =>  'require|unique:saas_business',
        'phone'  =>  'require|unique:saas_business|length:11',
        'user_name'  =>  'require',
    ];

    protected $message = [
        'name.require'  =>  '商家名称必须填写',
        'name.unique'  =>  '商家名称已存在',

        'phone.require'  =>  '商家电话必须填写',
        'phone.length'  =>  '商家电话位数不正确',
        'phone.unique'  =>  '商家电话已存在',

        'user_name.require'  =>  '商家联系人必须填写',

    ];
}
